package com.dimple;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: DimpleBlogApplication
 * @description: 启动程序
 */
@SpringBootApplication
public class DimpleBlogApplication  extends SpringBootServletInitializer {
    public static void main(String[] args) {
        //System.setProperty("spring.devtools.restart.enabled", "true");
        SpringApplication.run(DimpleBlogApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(DimpleBlogApplication.class);
    }


    @RestController
    class  IndexController{
        @GetMapping("/")
        public  String  index(){
            return "background server start up success....";
        }
    }

}
